<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('POS终端信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>终端编号[本地]：</label>
                                <input type="text" name="posno"/>
                            </li>
                            <li>
                                <label>终端类型：</label>
                                <select name="posType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>商户编号：</label>
                                <input type="text" name="merno"/>
                            </li>
                            <li>
                                <label>业务员编号：</label>
                                <input type="text" name="smNum"/>
                            </li>
                            <li>
                                <label>服务商编号：</label>
                                <input type="text" name="agentNum"/>
                            </li>
                            <li>
                                <label>销售员编号：</label>
                                <input type="text" name="saleNum"/>
                            </li>
                            <li>
                                <label>所属营业部：</label>
                                <input type="text" name="soNum"/>
                            </li>
                            <li>
                                <label>终端状态 0：启用 1：关停 2：绑定未开通：</label>
                                <select name="status">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>添加人：</label>
                                <input type="text" name="createman"/>
                            </li>
                            <li class="select-time">
                                <label>添加时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreatedate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreatedate]"/>
                            </li>
                            <li>
                                <label>备注：</label>
                                <input type="text" name="note"/>
                            </li>
                            <li>
                                <label>0 未删除：</label>
                                <input type="text" name="isdetele"/>
                            </li>
                            <li>
                                <label>绑定类型  1 首次绑定 2 增机：</label>
                                <select name="bindType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>机器号：</label>
                                <input type="text" name="machineNum"/>
                            </li>
                            <li>
                                <label>终端绑定查询接口  是否返回 0-是  1-否：</label>
                                <input type="text" name="isB001"/>
                            </li>
                            <li>
                                <label>1 新用户 2 存量用户 3 高收益用用户：</label>
                                <input type="text" name="isopen"/>
                            </li>
                            <li>
                                <label>流量卡费：</label>
                                <input type="text" name="simFee"/>
                            </li>
                            <li>
                                <label>A版(钱宝9号)、B版(钱宝5号)：</label>
                                <select name="dqType">
                                    <option value="">所有</option>
                                    <option value="-1">代码生成请选择字典属性</option>
                                </select>
                            </li>
                            <li>
                                <label>电签B版应扣费日期 绑定日期 + 1个月(yyyy-MM-dd)：</label>
                                <input type="text" name="kcDate"/>
                            </li>
                            <li>
                                <label>钱宝9号终端活动结束时间：</label>
                                <input type="text" name="endtime"/>
                            </li>
                            <li>
                                <label>是否扣除流量卡费 0 未扣：</label>
                                <input type="text" name="isKcsim"/>
                            </li>
                            <li>
                                <label>预计流量卡扣费日期：</label>
                                <input type="text" name="simEnd"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="formalPos:formalPos:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="formalPos:formalPos:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="formalPos:formalPos:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="formalPos:formalPos:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('formalPos:formalPos:edit')}]];
        var removeFlag = [[${@permission.hasPermi('formalPos:formalPos:remove')}]];
        var prefix = ctx + "formalPos/formalPos";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "POS终端信息",
                clickToSelect:true,
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键',
                    visible: false
                },
                {
                    field: 'posno',
                    title: '终端编号[本地]'
                },
                {
                    field: 'posType',
                    title: '终端类型'
                },
                {
                    field: 'merno',
                    title: '商户编号'
                },
                {
                    field: 'smNum',
                    title: '业务员编号'
                },
                {
                    field: 'agentNum',
                    title: '服务商编号'
                },
                {
                    field: 'saleNum',
                    title: '销售员编号'
                },
                {
                    field: 'soNum',
                    title: '所属营业部'
                },
                {
                    field: 'status',
                    title: '终端状态 0：启用 1：关停 2：绑定未开通'
                },
                {
                    field: 'createman',
                    title: '添加人'
                },
                {
                    field: 'createdate',
                    title: '添加时间'
                },
                {
                    field: 'note',
                    title: '备注'
                },
                {
                    field: 'isdetele',
                    title: '0 未删除'
                },
                {
                    field: 'bindType',
                    title: '绑定类型  1 首次绑定 2 增机'
                },
                {
                    field: 'machineNum',
                    title: '机器号'
                },
                {
                    field: 'isB001',
                    title: '终端绑定查询接口  是否返回 0-是  1-否'
                },
                {
                    field: 'isopen',
                    title: '1 新用户 2 存量用户 3 高收益用用户'
                },
                {
                    field: 'simFee',
                    title: '流量卡费'
                },
                {
                    field: 'dqType',
                    title: 'A版(钱宝9号)、B版(钱宝5号)'
                },
                {
                    field: 'kcDate',
                    title: '电签B版应扣费日期 绑定日期 + 1个月(yyyy-MM-dd)'
                },
                {
                    field: 'endtime',
                    title: '钱宝9号终端活动结束时间'
                },
                {
                    field: 'isKcsim',
                    title: '是否扣除流量卡费 0 未扣'
                },
                {
                    field: 'simEnd',
                    title: '预计流量卡扣费日期'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>